<!DOCTYPE html>
<html>
<head>
<title>HTML5 GetUserMedia Demo</title>
<meta charset="utf-8">
<meta name="viewport"
	content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
</head>
<body>
	<div class="wrapper">
		<input type="file" accept="image/*" capture="camera" id="takepicture" value="拍照" />
	</div>
</body>
<script type="text/javascript">
	// 监听照片拍摄,并获取照片流
	  var takePicture = document.getElementById('takepicture');
	  var takePictureUrl = function () {
	      takePicture.onchange = function (event) {
	          var files = event.target.files, file;
	          if (files && files.length > 0) {
	              file = files[0];
	         }
	     }
	 }();
	 
	 
	 function getCarNo(){
		var url = "http://localhost:8080/Client/testClient"
	 	var formData = new FormData();
	    formData.append('weeklyName', weeklyName);
	    formData.append('weeklyType', weeklytype);
	    formData.append('articleType', articleType);
	    formData.append('source', source);
	    formData.append('status', status);
	    formData.append('orderBy', orderBy);
	    formData.append('linkUrl', linkUrl);
	    formData.append('content', content);
	    formData.append('file', file);
		$.ajax({
			url: ctx + 'business/weeklyInfo/save',
			type: 'post',
			data: formData,
			processData: false,  
	        contentType: false,
	        success: function(data){
	        	handleSuccess(data);
	        }
		})
		 
	 }
	</script>
</html>
